<?php

require_once '../common/conn.php';

if (isset($_GET['start'])) {
    $num = $_GET['start'];
} else {
    $num = 0;
}
if (isset($_GET['limit'])) {
    $count = $_GET['limit'];
}
$codes = "P1A001,P2A004,P3A001,P3C007,P4A021,P4A022";
if (is_numeric($num) && is_numeric($count)) {
    $db = new DBC();
    $sql = "SELECT productid,flashcode,age,name,url,imageURL,version,size,type1,type2,type3,downloadtimes FROM t_product WHERE status = 1 AND flashcode NOT IN ('" . $codes . "') ORDER BY num LIMIT " . $num . "," . $count;
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>